<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>修改密码--layui后台管理模板 2.0</title>
  <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
</head>

<body>

<form class="layui-form">
  <div class="layui-form-item">
    <input type="text" class="layui-input" id="username" placeholder="请输入用户名" name="username">
  </div>
  <div class="layui-form-item">
    <input type="password" class="layui-input" id="oldPwd" placeholder="请输入密码" name="password">
  </div>
  <button class="layui-btn" lay-submit lay-filter="changePwd">立即修改</button>
</form>



<script type="text/javascript" src="../../layui/layui.js"></script>

<script>
  layui.use(['form','layer','jquery'],function () {
    var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery;
    form.on("submit(changePwd)",function(data){
      alert(JSON.stringify(data.field));
      return false;
    })



  })
</script>


</body>



</html>